 <#include "admin/common/include/html_head.html"> <#include
"admin/common/include/sysparam.html"> <#include
"admin/common/include/pagination.html">

<!-- BEGIN FORM-->

<div class="alert alert-error " id="blockVarErrTip"
	style="display: none;"></div>

<div class="portlet-body">
	<div class="clearfix">
		<button id="blockvar_query_btn" class="btn blue">
			<i class="icon-search"></i>&nbsp;&nbsp;查询
		</button> 
		<button id="blockvar_add_btn" class="btn blue">
			<i class="icon-plus"></i>&nbsp;&nbsp;新增
		</button>
		<button id="blockvar_del_btn" class="btn blue">
			<i class="icon-trash"></i>&nbsp;&nbsp;删除
		</button>
	</div>
	<br>
	<div id="blockVarShowDiv"><#include
		"admin/blockvar/varlist.html"></div>
</div>

<script>
	jQuery(document)
			.ready(
					function() {
						var webBlockId = '${(bean.id)?if_exists}';

						if (!webBlockId) {
							$('#blockVarErrTip').html('暂时不能编辑块参数属性，请先编辑块基本信息!');
							$('#blockVarErrTip').show();
							$('#blockvar_add_btn').attr('disabled', 'true');
							$('#blockvar_del_btn').attr('disabled', 'true');
						}
						$("#blockVarTab")
								.bind(
										"click",
										function(e) {
											e.preventDefault();
											$(this).tab('show');
											mainFrame.addArea(
													'${contextPath}/Admin-WebBlockVar-show.action?webBlockId='
															+ webBlockId,
													'blockVarShowDiv');
											tableAction
													.init({
														tableId : 'blockVarTable',
														queryUrl : '${contextPath}/Admin-WebBlockVar-show.action?webBlockId='
																+ webBlockId,
														deleteUrl : '${contextPath}/Admin-WebBlockVar-delete.action',
														editUrl : '${contextPath}/Admin-WebBlockVar-showEditForm.action?webBlockId='
															+ webBlockId,
														deleteBtnId : 'blockvar_del_btn',
														editBtnId : 'blockvar_add_btn',
														queryBtnId : 'blockvar_query_btn',
														areaId : 'blockVarShowDiv'
													});
										});
					});
</script>